<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%@ include file="/common/pre/header.jsp" %>
    <script src="/statics/js/backend/backend.js"></script>  
    <script type="text/javascript">
	
	function del(thisId,classroomId){
		
				if(confirm("确认删除吗")){
			   window.location.href = "/1and5Demo/user/delUsers?id="+thisId;
			  }
			  else{
			 
			   return;
			  }
			}
		
	
	

</script>
	 
</head>

<body>
	<c:if test="${empty userList}">
		<c:redirect url="/user/findUsers" ></c:redirect>
	</c:if>
<!--End Header End-->

<div class="i_bg bg_color">
    <!--Begin 用户中心 Begin -->
    <div class="m_content">
       
        <div class="m_right" id="content">
            <div class="mem_tit">用户列表</div>
            <p align="right">
                <a href="${ctx}/cop.jsp"  class="add_b">添加用户</a>
                <br>
            </p>
            <br>
            <table border="0" class="order_tab" style="width:750px; text-align:center; margin-bottom:30px;"
                   cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                	<td width="5%">用户ID</td>
                    <td width="5%">用户名称</td>
                    <td width="5%">电话</td>
                    <td width="5%" colspan="2">操作</td>
                </tr>
                <c:forEach items="${userList}" var="temp">
	                   <tr>
	                       <td>${temp.id}</td>
	                       <td>${temp.userName}</td>
	                       <td>${temp.phone}</td>
	              
	                       <td>
	                           <a href="/1and5Demo/user/findUsersByNo?id=${temp.id}">修改</a>
	                       </td>
	                       <td>
	                       	<c:if test="${sessionScope.loginUser.id!=temp.id}">
	                          	 <a onclick="del(${temp.id})">删除</a>
	                       	</c:if>
	                       </td>
	                   </tr>
                </c:forEach>
                </tbody>
            </table>
            <%@ include file="/pagerBar.jsp" %>
        </div>
    </div>
  
</div>

</body>
</html>


